increased nginx buffer to avoid 400 error from too large a request he…#41
Conversation
…ader. Other work to do here to trim header down
There was a problem hiding this comment.
Code Review
This pull request updates the Nginx configuration in prod/nginx.conf by increasing the client_header_buffer_size and large_client_header_buffers to accommodate larger request headers. Feedback suggests reducing the client_header_buffer_size to 4k to minimize memory consumption per connection while still allowing larger headers via the large_client_header_buffers directive.
| } | ||
|
|
||
| http { | ||
| client_header_buffer_size 16k; |
There was a problem hiding this comment.
Setting client_header_buffer_size to 16k allocates this amount of memory for every connection, which can lead to high memory consumption under load. It is more efficient to keep this value small (e.g., 1k or 4k) and rely on large_client_header_buffers to handle larger headers only when necessary. This ensures that standard requests don't consume unnecessary memory while still resolving the 400 errors for larger requests.
client_header_buffer_size 4k;
…ader. Other work to do here to trim header down
Need help on this PR? Tag
@codesmithwith what you need.